package com.arcanite.dailyplanner.model.util;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

/**
 *
 * Created by Arcnaite on 2016/10/20.
 */

public class CommonUtils {
    /**
     * 在FrameLayout上显示指定的Fragment
     * @param fgManager FragmentManager
     * @param flId FrameLayout的ID
     * @param fragment 需要显示的Fragment
     */
    public static void replaceFl2Fg(FragmentManager fgManager, int flId, Fragment fragment){
        FragmentTransaction fgTransaction = fgManager.beginTransaction();
        fgTransaction.add(flId, fragment);
        fgTransaction.commit();
    }
}
